package org.student.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.student.dao.IArrangeDao;
import org.student.entity.StuSys_Arrange;

import com.sun.org.apache.bcel.internal.generic.RETURN;

/**
 * 
 * @package org.student.service
 * @FileName ArrangeService.java
 * @Author 黄浩强
 * @Date 2011-9-28
 * @version V 1.0
 */
@Component("ArrangeService")
public class ArrangeService implements IArrangeDao {

	private IArrangeDao iArrangeDao;

	@Override
	public void classRoomInfoSave(StuSys_Arrange classArrange) throws Exception {
		// 课室信息插入
		this.iArrangeDao.classRoomInfoSave(classArrange);
	}

	public IArrangeDao getiArrangeDao() {
		return iArrangeDao;
	}

	@Resource(name = "ArrangeDaoImpl")
	public void setiArrangeDao(IArrangeDao iArrangeDao) {
		this.iArrangeDao = iArrangeDao;
	}

	@Override
	public List<StuSys_Arrange> getAllclassroomInfo() throws Exception {
		// 查询所有课室信息
		return this.iArrangeDao.getAllclassroomInfo();
	}

	/**
	 * getClassroomInfoById
	 * 
	 * @CodeBy :黄浩强 Oct 27, 201112:08:18 PM
	 * @Description ：
	 * @return
	 */
	@Override
	public StuSys_Arrange getClassroomInfoById(int id) throws Exception {
		// 通过ID查询课室信息
		return this.iArrangeDao.getClassroomInfoById(id);
	}

	/**
	 * updateClassroomInfo
	 * 
	 * @CodeBy :黄浩强 Oct 27, 201112:10:30 PM
	 * @Description ：
	 * @return
	 */
	@Override
	public void updateClassroomInfo(StuSys_Arrange arrange) throws Exception {
		// 更新课室信息
		this.iArrangeDao.updateClassroomInfo(arrange);
	}

	/**
	 * deleteClassroomInfoById
	 * 
	 * @CodeBy :黄浩强 Oct 27, 201110:56:09 PM
	 * @Description ：
	 * @return
	 */
	@Override
	public void deleteClassroomInfoById(int id) throws Exception {
		// 删除课室信息
		this.iArrangeDao.deleteClassroomInfoById(id);
	}

}
